UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xy4n3WpsDCBbItUvmLcr4pnodL7tLCqVoV7w35JjsPk='
WHERE
key_id = '72fdee8a0a3038c21ce5170f445ceb16f0fac2a99afbe2f1fc061c8256d69171'
AND (
token = 'xy4n3WpsDCBbItUvmLcr4pnodL7tLCqVoV7w35JjsPk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)