UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JwdrOR/bUQgSO1a+qkYSZBCUfNJ1oaCnjg7BsDWFe90='
WHERE
key_id = 'cecb070b4df177570ff7cc7c8896c1ea295474d8c3d7f44a575507df63531604'
AND (
token = 'JwdrOR/bUQgSO1a+qkYSZBCUfNJ1oaCnjg7BsDWFe90='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)