UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3Nj3Ld01EApB4H127Je3OLWEUtUHWKJGb2jUFdN5L6A='
WHERE
key_id = '7905fd03d530fd51aa5ed64c6af1675ada19330ed280e075659e5c089877d99f'
AND (
token = '3Nj3Ld01EApB4H127Je3OLWEUtUHWKJGb2jUFdN5L6A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)