UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OHT61EiONZHO+zfZ1W6fW1GCzxnxbkelK7vO9ojaodQ='
WHERE
key_id = '020eb3ed59954ab792764543da03cdf18ebfe6e8b1a86284017e0e50aabdfa7f'
AND (
token = 'OHT61EiONZHO+zfZ1W6fW1GCzxnxbkelK7vO9ojaodQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)