UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Irq1tNiE6GEhbZHvxUVm6RyM8xgooDahNORzIDLzTiQ=' 
WHERE 
  key_id = '7bbd2a0b5e4d180b56891e02abce1de0506855144acd5873ff757ba270df7af9' 
  AND (
    token = 'Irq1tNiE6GEhbZHvxUVm6RyM8xgooDahNORzIDLzTiQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024