UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DrrclM6BG+fslMfenBLB9FcVDF+asKxkMVqUGWjb3x0='
WHERE
key_id = '09667194abae3607ab1a9914bff4677c6cb3cff12deb34947c4eab233379f942'
AND (
token = 'DrrclM6BG+fslMfenBLB9FcVDF+asKxkMVqUGWjb3x0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)