UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+jK5W31FDsoy5sFaN3wX6lvtYFqx+tyPpxZrUi0c3PA='
WHERE
key_id = '754dc99f450a485c230e68fbd2f089c98984a2c7fb5c643306a316b92cdb2ef8'
AND (
token = '+jK5W31FDsoy5sFaN3wX6lvtYFqx+tyPpxZrUi0c3PA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)