UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vRcAy0iV65CtRUhXK6yteVwhqV1Rqt8otKQfM5aT79U='
WHERE
key_id = '92872cde4cf5f4243ebc59383ff6b5703ba4432283c568204bc696a837da4286'
AND (
token = 'vRcAy0iV65CtRUhXK6yteVwhqV1Rqt8otKQfM5aT79U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)