UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6r9ion/JNhsQez8yqRXrKdXY9d+FI8YZzyRWlBjDBrA=' 
WHERE 
  key_id = '77a8bf3b6eb27a531bebcf808dc72fcc7d9670c76df03e8822f5c8b1625f09d2' 
  AND (
    token = '6r9ion/JNhsQez8yqRXrKdXY9d+FI8YZzyRWlBjDBrA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031