UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/LOAg1Tq3NxwQTYjDgfEMfLH6Inu6mSrNmnVgfPJ/i0='
WHERE
key_id = 'bf9b72fccfc4ccf5778d8084a0e64fc28718cb1739252516c1cdd63e97728c5d'
AND (
token = '/LOAg1Tq3NxwQTYjDgfEMfLH6Inu6mSrNmnVgfPJ/i0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)