UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rFl0AcYAiVYxqXdzYi9xeYnHE0wIecqu2YZHzWu/SMk='
WHERE
key_id = '1268a5c828f3992f73e3302340c18c0b44e0f09c86a8280d110d17bc8f82f5b7'
AND (
token = 'rFl0AcYAiVYxqXdzYi9xeYnHE0wIecqu2YZHzWu/SMk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)