UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'RurfOI7nZyA9WO8fMUuhQae8CLNdFolQJUD/cbuJPeg=' 
WHERE 
  key_id = '5b357ea63a2da105227764066daadf9181ca9d9a235cad97b16d966bfb593794' 
  AND (
    token = 'RurfOI7nZyA9WO8fMUuhQae8CLNdFolQJUD/cbuJPeg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022