UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zHDwFBSyXydKgJ+KpeS9ONOt+sS522Dp9YeEeR/qujQ='
WHERE
key_id = 'f0df3cb258e1e6dac97156c0847d1fbbba29925b9bcbc4557c748311e8eae437'
AND (
token = 'zHDwFBSyXydKgJ+KpeS9ONOt+sS522Dp9YeEeR/qujQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)