UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ehF6EeYN/e8DrSylz13GhSWbiH7EmogM9mW2LjxSwfk=' 
WHERE 
  key_id = '0601618c7cf771d01ef0662467ab1b35253f3e19eba6150ffc515f7a59614ba1' 
  AND (
    token = 'ehF6EeYN/e8DrSylz13GhSWbiH7EmogM9mW2LjxSwfk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050