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

Query time 0.00029