UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/jT27fLrszZNHCgPQagvWCR0NW5pmU6A0ctHiT1IFfI=' 
WHERE 
  key_id = 'a7632a3d26dc6181715e693f33eebe4d871ecff55a81580882fdeb928369b447' 
  AND (
    token = '/jT27fLrszZNHCgPQagvWCR0NW5pmU6A0ctHiT1IFfI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023