UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'v/v+ao7Jg9uEIlzM7afl3zn1/ij0R1gBvJ0SHAdDIRw=' 
WHERE 
  key_id = '9f0b72d522b1aaa9d3c2c84fe0203dd6baee219ecebc744d1e8bb2242cc13aa8' 
  AND (
    token = 'v/v+ao7Jg9uEIlzM7afl3zn1/ij0R1gBvJ0SHAdDIRw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031