UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Lh7MAUfQ7p7nlkHE0nbh2aiFALSjpbN2/Wjby2K1c5Q='
WHERE
key_id = 'b94a0be9a34d6e0ab455b494d5e2a6ddeab46e9529d3011f0df5be610f4b7a9c'
AND (
token = 'Lh7MAUfQ7p7nlkHE0nbh2aiFALSjpbN2/Wjby2K1c5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)