UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bADTOGL89a7SCh2cnkpDPuUz/9DKIjNgS++OS94CRPM='
WHERE
key_id = 'f3d530c77af9a07cf7990ca9f2ad08cd639c5a2f16c20b1c160ad49f5e3f9ecd'
AND (
token = 'bADTOGL89a7SCh2cnkpDPuUz/9DKIjNgS++OS94CRPM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)