UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'feU/lJrO1xFJlkB7QsfMUnAsChW+4ICGcAYrweq5VWQ='
WHERE
key_id = '5672046a4973e43e138bbe59cedf7e064c6656fe06e8f748606ad373bd2d4072'
AND (
token = 'feU/lJrO1xFJlkB7QsfMUnAsChW+4ICGcAYrweq5VWQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)