UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+Mu4gprrzpZ7UYGoyW9Yy5de4eAQNlxkEqdq0vUB4yI='
WHERE
key_id = '2f1232a260a69d6e783129a8d3d815e507bb06cb9fcb17ab6c7a11330a6fa8f1'
AND (
token = '+Mu4gprrzpZ7UYGoyW9Yy5de4eAQNlxkEqdq0vUB4yI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)