UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '41YBXbNqYU9OS25av3icrNViGX7rZZS/eude2K7Ws7I='
WHERE
key_id = 'e50b5e88ec9157f6ecea664f788432265f5d30c4967b92650005d4933a651f6b'
AND (
token = '41YBXbNqYU9OS25av3icrNViGX7rZZS/eude2K7Ws7I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)