UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+NUJhlq2Vu7Yzh+ENDr+LGMaDt0LTidGXMcYoHqKzoc='
WHERE
key_id = '75c8eb1a8d936dc34c7bcaad785d5f05e1ebf7181136b52193f800b3c0c918bd'
AND (
token = '+NUJhlq2Vu7Yzh+ENDr+LGMaDt0LTidGXMcYoHqKzoc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)