UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Ji7xE48etAULcsfuXo7D2XygB5ZY/YljcV+0URIbt8='
WHERE
key_id = '6fa5af930ba8318b3d76cdc0942990c80b58e4d7d98329b635bcdbc50a88df09'
AND (
token = '1Ji7xE48etAULcsfuXo7D2XygB5ZY/YljcV+0URIbt8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)