UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kH7ZSSfpTL3ZxYtua5uPk0QKJI+dWVvHgAULCTDPB6c='
WHERE
key_id = 'c79b4ed6bb87188b2b3778dedd66d5d3bffdf3bc97c257f67f88c8fadcbc4d15'
AND (
token = 'kH7ZSSfpTL3ZxYtua5uPk0QKJI+dWVvHgAULCTDPB6c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)