UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FjMU1jqXE5/bwWK48lux74FO9K8EEXJo94loIavpjhc='
WHERE
key_id = '014c74d9a969fece3720925cb8b2f51ce2a590360156902933d87adf655c2309'
AND (
token = 'FjMU1jqXE5/bwWK48lux74FO9K8EEXJo94loIavpjhc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)