UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yOLLgYg+rSqKWH575mozwhnHxGZls2MuRoIf2a0qPPA='
WHERE
key_id = '81b55f5fe0439285705483614a0520ac8d6482d7ddff17142702402689e62f20'
AND (
token = 'yOLLgYg+rSqKWH575mozwhnHxGZls2MuRoIf2a0qPPA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)