UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'G8vpcpSiEvd32fASkPbOf05iS/Bi/m5pNf9uhgK2oAo=' 
WHERE 
  key_id = '9e823e0fe5181a08ff98c38a0528eeeb23ba160a15a14ba8171d3ee011764ca9' 
  AND (
    token = 'G8vpcpSiEvd32fASkPbOf05iS/Bi/m5pNf9uhgK2oAo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018