UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LxRyemgLsiXOYJj0FVHIlv6PB2LR9uqObg50k5FksjI=' 
WHERE 
  key_id = '602869b799c82f584f8db5e652b012a0f1003364295d363db6aa2980217b600b' 
  AND (
    token = 'LxRyemgLsiXOYJj0FVHIlv6PB2LR9uqObg50k5FksjI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022