UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l0dUSPJYfkk0jq8EE+gaU5bRpvvEdHflqr7nMLjD1WY='
WHERE
key_id = 'ec155f35dca4c6965fb3afc235c1d726f247f7198f3d943841a8de66f8d12501'
AND (
token = 'l0dUSPJYfkk0jq8EE+gaU5bRpvvEdHflqr7nMLjD1WY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)