UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '65Tjts123UBmL3DBoIQ6u98EJRO7dc5VN0rivHkHkvg='
WHERE
key_id = '55a76c2558684cd713180e05a766445aad36e72152c958dd0ec7b27cd538b7af'
AND (
token = '65Tjts123UBmL3DBoIQ6u98EJRO7dc5VN0rivHkHkvg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)