UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cdjNeOutcRPUNI1B5E4VKOUWw4L4/BvZDreaooCvk3c='
WHERE
key_id = 'e45595b71d6efd7e47425dc8db5fff3cdecfa7ec22bdf8ac67762ffb3da9eca7'
AND (
token = 'cdjNeOutcRPUNI1B5E4VKOUWw4L4/BvZDreaooCvk3c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)